package com.example.demo.controller;

import com.example.demo.async.AsyncService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.oas.annotations.EnableOpenApi;

/**
 * @author Jiange
 * @create 2021-05-08-19:07
 */
@RestController
@EnableOpenApi
@Api(value = "建哥")
public class MyController {
    @Autowired
    AsyncService asyncService;

    @GetMapping("/1")
    public String hello() throws InterruptedException {
        asyncService.async();
        return "hello";
    }
}
